home *** CD-ROM | disk | FTP | other *** search
- % $VER: Oberon.Headers.ps 1.0 (22.1.96)
- % m moveto x y -> -
- % s String s -> -
- % l Line x y w h -> -
- % x XLine x y dx dy -> -
- % c scaled Circle x y a b -> -
- % b shaded box x y w h col -> -
- % i pattern image x y w h mode -> -
- % p Page n -> -
- % f font mapping fnt -> -
- % z Bezier cubic section x1 y1 x2 y2 x3 y3 x0 y0 -> -
- % u UseColor r g b -> -
-
- %%% Parameters
- /printerOrigin (Pluto) def % one of Unix, Pluto, V3
- /paperSize (A4) def % one of A4, A3, Letter
- /orientation (Portrait) def % one of Portrait, Landscape
- /useSyntax (No) def % "Yes": do not substitute Syntax by Helvetica
- %%% EndParameters
-
- /bdef {bind def} bind def
- /m {moveto} bdef
- /s {show} bdef
- /u {setrgbcolor} bdef
-
- /l {
- /ph exch def
- /pw exch def
- newpath
- moveto
- pw 0 rlineto
- 0 ph rlineto
- pw neg 0 rlineto
- closepath
- fill
- } bdef
-
- /x {
- /dy exch def
- /dx exch def
- newpath
- moveto
- dx dy rlineto
- 0 setlinewidth % was 0 (JS)
- stroke
- } bdef
-
- /c {
- /pb exch def
- /pa exch def
- newpath
- gsave
- translate
- 1 pb pa div scale
- 0 0 pa 0 360 arc
- 0 setlinewidth % was 0 (JS)
- stroke
- grestore
- } bdef
-
- /shade {
- gsave
- col 0 eq {1 setgray} if
- col 1 eq {0.99 setgray} if
- col 2 eq {0.9 setgray} if
- col 3 eq {0.65 setgray} if
- col 4 eq {0.35 setgray} if
- col 5 eq {0 setgray} if
- fill
- grestore
- } bdef
-
- /max {
- /h1 exch def
- /h2 exch def
- h1 h2 lt {h2} {h1} ifelse
- } bdef
-
- /texture {
- gsave
- clip
- newpath
- col 6 eq
- { px 20 idiv 20 mul py ph add 20 idiv 20 mul moveto
- /maxwh pw ph max 20 add def
- maxwh 10 idiv 1 add
- { maxwh maxwh rlineto
- maxwh neg dup 20 sub rmoveto
- } repeat
- } if
- col 7 eq
- { px 20 idiv 20 mul py 20 idiv 20 mul moveto
- /maxwh pw ph max 20 add def
- maxwh 10 idiv 1 add
- { maxwh neg maxwh rlineto
- maxwh 20 add maxwh neg rmoveto
- } repeat
- } if
- col 8 eq
- { px 15 idiv 15 mul py 15 idiv 15 mul moveto
- /ph ph 25 add def
- pw 15 idiv 1 add
- { 0 ph rlineto
- 15 ph neg rmoveto
- } repeat
- } if
- col 9 eq
- { px 15 idiv 15 mul py 15 idiv 15 mul moveto
- /pw pw 15 add def
- ph 15 idiv 1 add
- { pw 0 rlineto
- pw neg 15 rmoveto
- } repeat
- } if
- 1 setlinewidth
- stroke
- grestore
- } bdef
-
- /b {
- /col exch def
- /ph exch def
- /pw exch def
- /py exch def
- /px exch def
- newpath
- px py moveto
- pw 0 rlineto
- 0 ph rlineto
- pw neg 0 rlineto
- closepath
- col 6 lt {shade} {texture} ifelse
- } bdef
-
- /i { % pattern image follows procedure i immediately
- /mode exch def
- /ph exch def
- /pw exch def
- /py exch def
- /px exch def
- /picstr 256 string def
- /nofbytes pw 7 add 8 idiv ph mul def
- gsave
- px py translate
- pw mode 1 add mul ph mode 1 add mul scale
- pw ph 1 [pw 0 0 ph 0 0]
- {nofbytes 256 ge
- { currentfile picstr readhexstring pop
- /nofbytes nofbytes 256 sub def }
- { /picstr nofbytes string def
- currentfile picstr readhexstring pop
- /nofbytes 0 def
- } ifelse
- } image
- grestore
- } bdef
-
- /f {findfont setfont} bdef
- %/f {cvn currentdict exch get setfont} bdef
- /MF {mul exch findfont exch scalefont setfont} bdef % MakeFont
- %/MF {mul 100 idiv exch findfont exch scalefont setfont} bdef % MakeFont (whole number scaling)
-
- /z {newpath moveto curveto 0 setlinewidth stroke } bdef % Bezier cubic section. width was 0 (JS)
-
- /p {/#copies exch def showpage restore save} bdef % show page for Booklet
- % /p {/#copies exch def} bdef % show page for Booklet
-
- /pl {gsave 2480 0 translate 90 rotate .7 .7 scale} bdef
- /pr {2506 0 translate} bdef
- /pp {grestore showpage restore save} bdef
-
- /GlobalBuildGlyph {
- 1 index /CharData get exch
- 2 copy known not {pop /.notdef} if get
- dup 0 get 0
- 2 index 1 4 getinterval aload pop
- setcachedevice
- dup 5 2 getinterval aload pop true
- 5 4 roll /imageMaskMatrix get
- dup 4 6 index 7 get put
- dup 5 6 index 8 get put
- 5 4 roll 9 1 getinterval cvx
- imagemask
- } def
-
- /GlobalBuildChar {
- 1 index /Encoding get exch get
- 1 index /BuildGlyph get exec
- } def
-
- /FullOberonEncoding [
- /ascii000/ascii001/ascii002/ascii003/ascii004/ascii005/ascii006/ascii007
- /ascii008/ascii009/ascii010/ascii011/ascii012/ascii013/ascii014/ascii015
- /ascii016/ascii017/ascii018/ascii019/ascii020/ascii021/ascii022/ascii023
- /ascii024/ascii025/ascii026/ascii027/ascii028/ascii029/ascii030/ascii031
- /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle
- /parenleft/parenright/asterisk/plus/comma/minus/period/slash
- /zero/one/two/three/four/five/six/seven
- /eight/nine/colon/semicolon/less/equal/greater/question
- /at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z
- /bracketleft/backslash/bracketright/arrowup/underscore/grave
- /a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z
- /braceleft/bar/braceright/tilde/ascii127
- /Adieresis/Odieresis/Udieresis/adieresis/odieresis/udieresis/acircumflex/ecircumflex
- /icircumflex/oicircumflex/uicircumflex/agrave/egrave/igrave/ograve/ugrave
- /eacute/edieresis/idieresis/ccedilla/aacute/ntilde
- /ascii150/ascii151/ascii152/ascii153/ascii154
- /endash %/ascii155
- /ascii156/ascii157/ascii158/hyphen
- /ascii160/ascii161/ascii162/ascii163/ascii164/ascii165/ascii166/ascii167
- /ascii168/ascii169/ascii170/germandbls/ascii172/ascii173/ascii174/ascii175
- /ascii176/ascii177/ascii178/ascii179/ascii180/ascii181/ascii182/ascii183
- /ascii184/ascii185/ascii186/ascii187/ascii188/ascii189/ascii190/ascii191
- /ascii192/ascii193/ascii194/ascii195/ascii196/ascii197/ascii198/ascii199
- /ascii200/ascii201/ascii202/ascii203/ascii204/ascii205/ascii206/ascii207
- /ascii208/ascii209/ascii210/ascii211/ascii212/ascii213/ascii214/ascii215
- /ascii216/ascii217/ascii218/ascii219/ascii220/ascii221/ascii222/ascii223
- /ascii224/ascii225/ascii226/ascii227/ascii228/ascii229/ascii230/ascii231
- /ascii232/ascii233/ascii234/ascii235/ascii236/ascii237/ascii238/ascii239
- /ascii240/ascii241/ascii242/ascii243/ascii244/ascii245/ascii246/ascii247
- /ascii248/ascii249/ascii250/ascii251/ascii252/ascii253/ascii254/ascii255
- ] def
-
- /OberonEncoding [
- 128 /Adieresis
- 129 /Odieresis
- 130 /Udieresis
- 131 /adieresis
- 132 /odieresis
- 133 /udieresis
- 134 /acircumflex
- 135 /ecircumflex
- 136 /icircumflex
- 137 /ocircumflex
- 138 /ucircumflex
- 139 /agrave
- 140 /egrave
- 141 /igrave
- 142 /ograve
- 143 /ugrave
- 144 /eacute
- 145 /edieresis
- 146 /idieresis
- 147 /ccedilla
- 148 /aacute
- 149 /ntilde
- 155 /endash
- 159 /hyphen
- 171 /germandbls
- ] def
-
- % font reencoding taken from P. Vollenweider, PostScript, Hanser Verlag 1988
- % encoding vector is /OberonEncoding
- % newfontdict basefontdict recode -
-
- /recode
- { findfont /basefontdict exch def
- /OberonFont basefontdict maxlength dict def
- basefontdict
- { exch dup /FID ne
- { dup /Encoding eq
- { exch dup length array copy OberonFont 3 1 roll put }
- { exch OberonFont 3 1 roll put }
- ifelse
- }
- { pop pop }
- ifelse
- } forall
- OberonEncoding aload pop
- OberonEncoding length 2 idiv {OberonFont /Encoding get 3 1 roll put} repeat
- dup OberonFont exch /FontName exch put
- OberonFont definefont pop
- } bdef
-
-
- /OberonInit {
- % systemdict /gcheck known {
- % mark
- % /HWResolution [300 300]
- % counttomark 2 idiv dup dict begin
- % {def} repeat
- % pop currentdict
- % end
- % setpagedevice
- % } if
- paperSize (A4) eq {.24 .24 scale} if
- paperSize (A3) eq {.34 .34 scale} if
- paperSize (Letter) eq {.24 .22 scale} if
- orientation (Portrait) eq
- { printerOrigin (Pluto) eq {152 18 translate} if
- printerOrigin (Unix) eq {60 10 translate} if
- printerOrigin (V3) eq {0 0 translate} if %Oberon4Amiga 1.0 used: 10 0
- }
- { 2480.3 0 translate 90 rotate
- printerOrigin (Pluto) eq {12 106 translate} if
- printerOrigin (Unix) eq {7 42 translate} if
- printerOrigin (V3) eq {0 0 translate} if
- } ifelse
- 0 setgray
- } bdef
-
- /OberonClose {
- } bdef
-
- % Font mapping
-
- /Helvetica-ScaleFactor 3.66 def
- /Helvetica.Roman.Fnt /Helvetica def
- /Helvetica.Bold.Fnt /Helvetica-Bold def
- /Helvetica.Italic.Fnt /Helvetica-Oblique def
- /Helvetica.Magic.Fnt /Helvetica def
-
- useSyntax (Yes) eq
- { /Syntax-ScaleFactor 3.66 def % a better value anyone?
- /Syntax.Roman.Fnt /Syntax-Roman def
- /Syntax.Bold.Fnt /Syntax-Bold def
- /Syntax.Italic.Fnt /Syntax-Italic def
- /Syntax.Magic.Fnt /Syntax-Roman def
- }
- { /Syntax-ScaleFactor Helvetica-ScaleFactor def
- /Syntax.Roman.Fnt Helvetica.Roman.Fnt def
- /Syntax.Bold.Fnt Helvetica.Bold.Fnt def
- /Syntax.Italic.Fnt Helvetica.Italic.Fnt def
- /Syntax.Magic.Fnt Helvetica.Magic.Fnt def
- } ifelse
-
- /Times-ScaleFactor 4 def
- /Times.Roman.Fnt /Times-Roman def
- /Times.Italic.Fnt /Times-Italic def
- /Times.Bold.Fnt /Times-Bold def
- /Times.Magic.Fnt /Times-Roman def
-
- /Courier-ScaleFactor 4 def
- /Courier.Roman.Fnt /Courier def
- /Courier.Italic.Fnt /Courier-Italic def
- /Courier.Bold.Fnt /Courier-Bold def
- /Courier.Magic.Fnt /Courier def
-
-